package stage1;

public class check5_3 {
    public static void main(String[] args) {
        Triangle tr = new Triangle(2 ,3);
        Rectangle re = new Rectangle(3,4);
        Circle ci = new Circle(3);
        Shape [] shapes = new Shape[3];
        shapes[0]=tr;
        shapes[1]=re;
        shapes[2]=ci;
        String[] title={"三角形的面积:","矩形面积:","圆的面积:"};
        for (int i=0;i<shapes.length;i++){
            System.out.println(title[i]+shapes[i].calArea());
        }
    }
}
